#!/bin/ksh
# @(#)25        1.75  src/sysmgt/dsm/bin/pccLinks.sh, websm, r31.hsc, hsc_wsm_051002 5/9/02 10:12:59";


DEFAULT_LANG=`echo $LANG`
DEFAULT_DIR=/var/www/html

if [ $# -gt 0 ] ; then
  if [ "$1" = "-lang" ] ; then
     PCC_LANG="$2"
  fi
  if [ "$3" = "-dir" ] ; then
     PCC_DIR="$4"
  fi
fi

if [ "${PCC_LANG}" = "" ] ; then
  PCC_LANG=${DEFAULT_LANG}
fi

if [ "${PCC_DIR}" = "" ] ; then
  PCC_DIR=${DEFAULT_DIR}
fi

cd ${PCC_DIR}

ln -sf pc_client/htmls/${PCC_LANG}/pc_client.html pc_client.html
ln -sf pc_client/htmls/${PCC_LANG}/pc_client.html remote_client.html
ln -sf pc_client/htmls/${PCC_LANG}/pc_client_security.html pc_client_security.html
ln -sf pc_client/htmls/${PCC_LANG}/pc_client_security.html remote_client_security.html
ln -sf pc_client/htmls/${PCC_LANG}/pcctoc.html 	pcctoc.html
ln -sf pc_client/htmls/${PCC_LANG}/pccwarning.html pccwarning.html
ln -sf pc_client/htmls/${PCC_LANG}/wsmsec_not_installed.html wsmsec_not_installed.html
ln -sf pc_client/htmls/${PCC_LANG}/wsmsec_installed.html wsmsec_installed.html
ln -sf pc_client/htmls/${PCC_LANG}/wsmbanner.html wsmbanner.html

# If one of the security .exe files is installed, then set the pccsecwarning.html
# link to allow download, else link it to an informative message
J=/usr/websm/pc_client/setupsec-ex.exe
K=/usr/websm/pc_client/setupsec-us.exe
L=/usr/websm/pc_client/setupsecl-ex.exe
M=/usr/websm/pc_client/setupsecl-us.exe
if [ -f ${J} -o -f ${K} -o -f ${L} -o -f ${M} ]
then
	ln -sf pc_client/htmls/${PCC_LANG}/wsmsec_installed.html pccsecwarning.html
else
	ln -sf pc_client/htmls/${PCC_LANG}/wsmsec_not_installed.html pccsecwarning.html
fi


